package com.heima.es.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

/**
 * 存入
 */
@Data
public class FinallSearchArticleVo {

    // 文章id
    private Long id;
    // 文章标题
    private String title;
    // 文章发布时间
    private Date publishTime;
    // 文章布局
    private Integer layout;
    // 封面
    private String images;
    // 作者id
    private Long authorId;
    // 作者名词
    private String authorName;
    //静态url
    private String staticUrl;
    //文章内容
    private String content;

    //文章建议词
    private String suggestion;

    public FinallSearchArticleVo() {

    }

    public FinallSearchArticleVo(SearchArticleVo searchArticleVo) {
        this.id = searchArticleVo.getId();
        this.title = searchArticleVo.getTitle();
        this.publishTime = searchArticleVo.getPublishTime();
        this.layout = searchArticleVo.getLayout();
        this.images = searchArticleVo.getImages();
        this.authorId = searchArticleVo.getAuthorId();
        this.authorName = searchArticleVo.getAuthorName();
        this.staticUrl = searchArticleVo.getStaticUrl();
        this.content = searchArticleVo.getContent();
        this.suggestion = this.title;
    }
}